import request from "@/utils/request";
import type{PageType} from "@/api/type";
import type {Sku,SkuItemDetailVO} from "@/api/serve/re-market/sku/type";

enum API{
    SKU_BASE="/serve/re-market/sku",
    SKU_PAGE="/serve/re-market/sku/page",
    SKU_DETAIL="/serve/re-market/sku/detail",
}

export function reqGetSkuPage(params: any) {
    return request<PageType<Sku>>({
        url: API.SKU_PAGE,
        method: "get",
        params
    })
}

export function reqGetSkuDetail(skuId:number) {
    return request<SkuItemDetailVO>({
        url: API.SKU_DETAIL+"/"+skuId,
        method: "get",
    })
}
